package bf.utils;

import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

public class FileParser {

	public static String getValue(String configFile, String variableName) {
		String value = null;
		List<String> l = Arrays.asList(configFile.split(System.getProperty("line.separator")));
		Iterator it = l.iterator();
		while (it.hasNext()) {
			String s = (String)it.next();
			if(s.indexOf(variableName) >= 0) {
				value = s.substring(s.indexOf('=') + 1);
			}
		}
		return value;
	}
	
}
